pkgname="linuxigd"
pkgver="1.0"
pkgrel=2
pkgdesc="Linux UPnP Internet Gateway Device."
url="http://linux-igd.sourceforge.net/"
arch=('i686' 'x86_64')
license=('GPL')
depends=('libupnp>=1.4.1' 'iptables')
source=("http://downloads.sourceforge.net/sourceforge/linux-igd/$pkgname-$pkgver.tar.gz"
	"igd-install-destdir.patch"
	"igd-iptables-arch.patch"
	"igd-startup-script.tgz")
md5sums=('929f5c4878c91d534613b7c7070215d9'
         'c35bc56057078f060c28cf44c987f015'
         '86047972d6967094a33fc12f8fe8b352'
         'ff9fb0adb74c8568cd33daf289d7b1dc')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  patch -p1 < "$srcdir/igd-install-destdir.patch" || return 1
  patch -p1 < "$srcdir/igd-iptables-arch.patch" || return 1
  make || return 1
  make DESTDIR="$pkgdir" install
  cp -R "$srcdir/etc" "$pkgdir"
}

